/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ta.entity;

import javax.validation.constraints.NotNull;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * 业务挂起Entity
 * 
 * @author TTAO
 * @version 2017-06-11
 */
public class StSuspend extends DataEntity<StSuspend> {

	private static final long serialVersionUID = 1L;
	private Long iid; // 实例ID
	private Date startDate; // 挂起时间
	private Date enDate; 
	private Date endDate; // 解挂时间
	private String userid; // 用户ID
	private String endUserid; // 解挂用户ID
	private String description; // 描述
	private String stpname; // 岗位名称
	private Long totaltime; // 总体时间
	private Long xtSuspendId; // xt_suspend_id
	private Long suspendType; // 0-用户原因 1-上报上级部门 2-其它原因
	private String applyId; // 申请挂起ID(空表示未申请直接挂起)

	private User user;
	private User endUser;

	public StSuspend() {
		super();
	}

	public StSuspend(String id) {
		super(id);
	}

	
	
	public Date getEnDate() {
		return enDate;
	}

	public void setEnDate(Date enDate) {
		this.enDate = enDate;
	}

	@NotNull(message = "实例ID不能为空")
	public Long getIid() {
		return iid;
	}

	public void setIid(Long iid) {
		this.iid = iid;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message = "挂起时间不能为空")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Length(min = 0, max = 36, message = "用户ID长度必须介于 0 和 36 之间")
	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	@Length(min = 0, max = 36, message = "解挂用户ID长度必须介于 0 和 36 之间")
	public String getEndUserid() {
		return endUserid;
	}

	public void setEndUserid(String endUserid) {
		this.endUserid = endUserid;
	}

	@Length(min = 0, max = 255, message = "描述长度必须介于 0 和 255 之间")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Length(min = 0, max = 36, message = "岗位名称长度必须介于 0 和 36 之间")
	public String getStpname() {
		return stpname;
	}

	public void setStpname(String stpname) {
		this.stpname = stpname;
	}

	public Long getTotaltime() {
		return totaltime;
	}

	public void setTotaltime(Long totaltime) {
		this.totaltime = totaltime;
	}

	public Long getXtSuspendId() {
		return xtSuspendId;
	}

	public void setXtSuspendId(Long xtSuspendId) {
		this.xtSuspendId = xtSuspendId;
	}

	public Long getSuspendType() {
		return suspendType;
	}

	public void setSuspendType(Long suspendType) {
		this.suspendType = suspendType;
	}

	@Length(min = 0, max = 36, message = "申请挂起ID(空表示未申请直接挂起)长度必须介于 0 和 36 之间")
	public String getApplyId() {
		return applyId;
	}

	public void setApplyId(String applyId) {
		this.applyId = applyId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getEndUser() {
		return endUser;
	}

	public void setEndUser(User endUser) {
		this.endUser = endUser;
	}

}